
export function isNull(obj){
    return obj==null || obj==undefined
}
export function isEmpty(obj){
    if (!isNull(obj)) {
        if ('string' == typeof obj && obj.length>0){
            return false
        }
    }
    return true
}
export function isType(obj, type){
    return !isNull(obj)&&(type == typeof obj || obj instanceof type)
}


export function inArray(obj, arr, handler){
    if(!isNull(obj)&&isType(arr, Array)){
        func = isNull(handler)==false?handler:function(o1,o2){
            return o1===o2
        }
        for(let o of arr){
            if(handler(obj, o)){
                return true
            }
        }
    }
    return false
}


